package com.company;


import com.company.service.LRUMap;

public class Task1 {


    public static void main(String[] args) {
        //todo 1. 编写一个通用的LRU缓存；
        LRUMap<String,String> lruMap = new LRUMap(3) ;
        lruMap.put("1","tom") ;
        lruMap.put("2","lisa") ;
        lruMap.put("3","john") ;
        System.out.println(lruMap.toString());
        lruMap.put("4","july") ;
        System.out.println(lruMap.toString());
        lruMap.put("5","jack") ;
        System.out.println(lruMap.toString());
        String value = lruMap.get("3");
        System.out.println(lruMap.toString());
        System.out.println("the value is: "+value);
        String value1 = lruMap.get("1");
        System.out.println(value1);
        System.out.println(lruMap.toString());

    }

}
